#ifndef _CHIPMUCK_STUB_
#define _CHIPMUCK_STUB_

#include <inttypes.h>
#include "hw/hw.h"
#include "cpu-all.h"

#define EVENT_ID_BREAKPOINT	0
#define EVENT_ID_WATCHPOINT	1
#define EVENT_ID_TIMER_INT	2

#define MAX_BP_NUM 32

struct chipmuck_breakpoint {
	uint32_t addr;
	int index;
};

struct chipmuck_watchpoint {
	uint32_t addr;
	int index;
};

void chipmuck_stub_init();
void chipmuck_stub_handler(void *data, int reason);

extern int chipmuck_event_id;
extern CPUState *chipmuck_env;
extern uint32_t chipmuck_access_addr;

#endif
